package zjh_20230310;

import java.io.File;
import java.io.IOException;

public class Demo01 {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\kaifamiao\\project\\new");
        System.out.println(file.exists());
        String s = file.getParent();
        System.out.println(s);
        File file1 = file.getParentFile();
        System.out.println(file1);
        File file2 = new File("\\aaa\\a.txtx");

//        if (!file2.exists()){
//
//        }
        File file3 = new File("");
        String courseFile = file3.getCanonicalPath();
        System.out.println(courseFile);



//        String s1 =  file2.getPath();
//        System.out.println(s1);
    }

}
